﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.CApFLEXRotatingSlidingAttachment
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands;

public class CApFLEXRotatingSlidingAttachment : CApFLEXAttachment
{
  private readonly TxCableRotatingSlidingAttachment m_rotatingSlidingAttachment;

  public CApFLEXRotatingSlidingAttachment(ICApCableExtentDescriptor cableExtentDescriptor)
    : base(cableExtentDescriptor)
  {
    this.m_rotatingSlidingAttachment = new TxCableRotatingSlidingAttachment();
  }

  public CApFLEXRotatingSlidingAttachment(
    ITxCable cable,
    TxCableRotatingSlidingAttachment rotatingSlidingAttachment)
    : base(cable)
  {
    this.m_rotatingSlidingAttachment = rotatingSlidingAttachment;
  }

  public override TxCableAttachment Attachment
  {
    get => (TxCableAttachment) this.m_rotatingSlidingAttachment;
  }

  public void SetAlongCable(ITxLocatableObject fixedFrame, double lengthFromStart)
  {
    this.m_rotatingSlidingAttachment.SetAlongCable(fixedFrame, lengthFromStart);
    this.NotifyPropertyChanged("Location");
    this.NotifyPropertyChanged("FixedFrame");
    this.NotifyPropertyChanged("LengthFromStart");
  }

  public CApFLEXRotatingSlidingAttachmentRotationAxis RotationAxis
  {
    get
    {
      return (CApFLEXRotatingSlidingAttachmentRotationAxis) this.m_rotatingSlidingAttachment.RotationAxis;
    }
    set
    {
      this.m_rotatingSlidingAttachment.RotationAxis = (TxCableAttachmentRotationAxis) value;
      this.NotifyPropertyChanged(nameof (RotationAxis));
    }
  }
}
